package com.example.LibrarySystem.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.util.Date;

@TableName("borrowing")
public class Borrowing {
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    private Integer bookId;
    private Integer userId;
    private boolean isReturn;
    private Date returnDate;
    private Date borroDate;
    private Integer status;

    private String description;

    public Borrowing() {

    }

    public Borrowing(Integer id, Integer bookId, Integer userId, boolean isReturn, Date returnDate, Date borroDate, Integer status, String description) {
        this.id = id;
        this.bookId = bookId;
        this.userId = userId;
        this.isReturn = isReturn;
        this.returnDate = returnDate;
        this.borroDate = borroDate;
        this.status = status;
        this.description = description;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getBookId() {
        return bookId;
    }

    public void setBookId(Integer bookId) {
        this.bookId = bookId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public boolean isReturn() {
        return isReturn;
    }

    public void setReturn(boolean aReturn) {
        isReturn = aReturn;
    }

    public Date getReturnDate() {
        return returnDate;
    }

    public void setReturnDate(Date returnDate) {
        this.returnDate = returnDate;
    }

    public Date getBorroDate() {
        return borroDate;
    }

    public void setBorroDate(Date borroDate) {
        this.borroDate = borroDate;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Override
    public String toString() {
        return "Borrowing{" +
                "id=" + id +
                ", bookId=" + bookId +
                ", userId=" + userId +
                ", isReturn=" + isReturn +
                ", returnDate=" + returnDate +
                ", borroDate=" + borroDate +
                ", status=" + status +
                ", description='" + description + '\'' +
                '}';
    }
}
